/**
 * 地图扩展
 */
import MousePosition from 'ol/control/MousePosition'
import coordinate from 'ol/coordinate'

// 鼠标指针监听扩展
export const mousePositionExtend = new MousePosition({
  coordinateFormat: coordinate.createStringXY(6),
  projection: 'EPSG:4326',
  // comment the following two lines to have the mouse position
  // be placed within the map.
  className: 'custom-mouse-position',
  target: document.getElementById('mouse-position'),
  undefinedHTML: '&nbsp'
})
